Optimal. Leaf size=531 \[ -\frac {x \left (-3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (d g+e f)+b^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )+b^2 e^3 g^3 (-3 a e g+b d g+b e f)-3 c^2 e g \left (a e g \left (d^2 g^2+d e f g+e^2 f^2\right )-b \left (d^3 g^3+d^2 e f g^2+d e^2 f^2 g+e^3 f^3\right )\right )-\left (c^3 \left (d^4 g^4+d^3 e f g^3+d^2 e^2 f^2 g^2+d e^3 f^3 g+e^4 f^4\right )\right )\right )}{e^5 g^5}+\frac {x^2 \left (-3 c^2 e g \left (a e g (d g+e f)-b \left (d^2 g^2+d e f g+e^2 f^2\right )\right )-3 b c e^2 g^2 (-2 a e g+b d g+b e f)+b^3 e^3 g^3-\left (c^3 \left (d^3 g^3+d^2 e f g^2+d e^2 f^2 g+e^3 f^3\right )\right )\right )}{2 e^4 g^4}+\frac {c x^3 \left (-3 c e g (-a e g+b d g+b e f)+3 b^2 e^2 g^2+c^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )}{3 e^3 g^3}+\frac {\log (d+e x) \left (a e^2-b d e+c d^2\right )^3}{e^6 (e f-d g)}-\frac {\log (f+g x) \left (a g^2-b f g+c f^2\right )^3}{g^6 (e f-d g)}-\frac {c^2 x^4 (-3 b e g+c d g+c e f)}{4 e^2 g^2}+\frac {c^3 x^5}{5 e g} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.99, antiderivative size = 531, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.037, Rules used = {893} \[ -\frac {x \left (-3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (d g+e f)+b^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )+b^2 e^3 g^3 (-3 a e g+b d g+b e f)-3 c^2 e g \left (a e g \left (d^2 g^2+d e f g+e^2 f^2\right )-b \left (d^2 e f g^2+d^3 g^3+d e^2 f^2 g+e^3 f^3\right )\right )+c^3 \left (-\left (d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4+d e^3 f^3 g+e^4 f^4\right )\right )\right )}{e^5 g^5}+\frac {c x^3 \left (-3 c e g (-a e g+b d g+b e f)+3 b^2 e^2 g^2+c^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )}{3 e^3 g^3}+\frac {x^2 \left (-3 c^2 e g \left (a e g (d g+e f)-b \left (d^2 g^2+d e f g+e^2 f^2\right )\right )-3 b c e^2 g^2 (-2 a e g+b d g+b e f)+b^3 e^3 g^3+c^3 \left (-\left (d^2 e f g^2+d^3 g^3+d e^2 f^2 g+e^3 f^3\right )\right )\right )}{2 e^4 g^4}+\frac {\log (d+e x) \left (a e^2-b d e+c d^2\right )^3}{e^6 (e f-d g)}-\frac {\log (f+g x) \left (a g^2-b f g+c f^2\right )^3}{g^6 (e f-d g)}-\frac {c^2 x^4 (-3 b e g+c d g+c e f)}{4 e^2 g^2}+\frac {c^3 x^5}{5 e g} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 893
Rubi steps
\begin {align*} \int \frac {\left (a+b x+c x^2\right )^3}{(d+e x) (f+g x)} \, dx &=\int \left (\frac {-b^2 e^3 g^3 (b e f+b d g-3 a e g)+c^3 \left (e^4 f^4+d e^3 f^3 g+d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4\right )+3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (e f+d g)+b^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right )+3 c^2 e g \left (a e g \left (e^2 f^2+d e f g+d^2 g^2\right )-b \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )\right )}{e^5 g^5}+\frac {\left (b^3 e^3 g^3-3 b c e^2 g^2 (b e f+b d g-2 a e g)-c^3 \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )-3 c^2 e g \left (a e g (e f+d g)-b \left (e^2 f^2+d e f g+d^2 g^2\right )\right )\right ) x}{e^4 g^4}+\frac {c \left (3 b^2 e^2 g^2-3 c e g (b e f+b d g-a e g)+c^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right ) x^2}{e^3 g^3}-\frac {c^2 (c e f+c d g-3 b e g) x^3}{e^2 g^2}+\frac {c^3 x^4}{e g}+\frac {\left (c d^2-b d e+a e^2\right )^3}{e^5 (e f-d g) (d+e x)}+\frac {\left (c f^2-b f g+a g^2\right )^3}{g^5 (-e f+d g) (f+g x)}\right ) \, dx\\ &=-\frac {\left (b^2 e^3 g^3 (b e f+b d g-3 a e g)-c^3 \left (e^4 f^4+d e^3 f^3 g+d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4\right )-3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (e f+d g)+b^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right )-3 c^2 e g \left (a e g \left (e^2 f^2+d e f g+d^2 g^2\right )-b \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )\right )\right ) x}{e^5 g^5}+\frac {\left (b^3 e^3 g^3-3 b c e^2 g^2 (b e f+b d g-2 a e g)-c^3 \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )-3 c^2 e g \left (a e g (e f+d g)-b \left (e^2 f^2+d e f g+d^2 g^2\right )\right )\right ) x^2}{2 e^4 g^4}+\frac {c \left (3 b^2 e^2 g^2-3 c e g (b e f+b d g-a e g)+c^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right ) x^3}{3 e^3 g^3}-\frac {c^2 (c e f+c d g-3 b e g) x^4}{4 e^2 g^2}+\frac {c^3 x^5}{5 e g}+\frac {\left (c d^2-b d e+a e^2\right )^3 \log (d+e x)}{e^6 (e f-d g)}-\frac {\left (c f^2-b f g+a g^2\right )^3 \log (f+g x)}{g^6 (e f-d g)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.42, size = 476, normalized size = 0.90 \[ -\frac {e g x \left (-30 c e^2 g^2 (e f-d g) \left (6 a^2 e^2 g^2+6 a b e g (-2 d g-2 e f+e g x)+b^2 \left (6 d^2 g^2-3 d e g (g x-2 f)+e^2 \left (6 f^2-3 f g x+2 g^2 x^2\right )\right )\right )-30 b^2 e^3 g^3 (e f-d g) (6 a e g+b (-2 d g-2 e f+e g x))+15 c^2 e g \left (b \left (-12 d^4 g^4+6 d^3 e g^4 x-4 d^2 e^2 g^4 x^2+3 d e^3 g^4 x^3+e^4 f \left (12 f^3-6 f^2 g x+4 f g^2 x^2-3 g^3 x^3\right )\right )-2 a e g (e f-d g) \left (6 d^2 g^2-3 d e g (g x-2 f)+e^2 \left (6 f^2-3 f g x+2 g^2 x^2\right )\right )\right )+c^3 \left (60 d^5 g^5-30 d^4 e g^5 x+20 d^3 e^2 g^5 x^2-15 d^2 e^3 g^5 x^3+12 d e^4 g^5 x^4+e^5 f \left (-60 f^4+30 f^3 g x-20 f^2 g^2 x^2+15 f g^3 x^3-12 g^4 x^4\right )\right )\right )-60 g^6 \log (d+e x) \left (e (a e-b d)+c d^2\right )^3+60 e^6 \log (f+g x) \left (g (a g-b f)+c f^2\right )^3}{60 e^6 g^6 (e f-d g)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 9.83, size = 736, normalized size = 1.39 \[ \frac {60 \, {\left (c^{3} d^{6} - 3 \, b c^{2} d^{5} e - 3 \, a^{2} b d e^{5} + a^{3} e^{6} + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{4} e^{2} - {\left (b^{3} + 6 \, a b c\right )} d^{3} e^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} d^{2} e^{4}\right )} g^{6} \log \left (e x + d\right ) + 12 \, {\left (c^{3} e^{6} f g^{5} - c^{3} d e^{5} g^{6}\right )} x^{5} - 15 \, {\left (c^{3} e^{6} f^{2} g^{4} - 3 \, b c^{2} e^{6} f g^{5} - {\left (c^{3} d^{2} e^{4} - 3 \, b c^{2} d e^{5}\right )} g^{6}\right )} x^{4} + 20 \, {\left (c^{3} e^{6} f^{3} g^{3} - 3 \, b c^{2} e^{6} f^{2} g^{4} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{6} f g^{5} - {\left (c^{3} d^{3} e^{3} - 3 \, b c^{2} d^{2} e^{4} + 3 \, {\left (b^{2} c + a c^{2}\right )} d e^{5}\right )} g^{6}\right )} x^{3} - 30 \, {\left (c^{3} e^{6} f^{4} g^{2} - 3 \, b c^{2} e^{6} f^{3} g^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{6} f^{2} g^{4} - {\left (b^{3} + 6 \, a b c\right )} e^{6} f g^{5} - {\left (c^{3} d^{4} e^{2} - 3 \, b c^{2} d^{3} e^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{2} e^{4} - {\left (b^{3} + 6 \, a b c\right )} d e^{5}\right )} g^{6}\right )} x^{2} + 60 \, {\left (c^{3} e^{6} f^{5} g - 3 \, b c^{2} e^{6} f^{4} g^{2} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{6} f^{3} g^{3} - {\left (b^{3} + 6 \, a b c\right )} e^{6} f^{2} g^{4} + 3 \, {\left (a b^{2} + a^{2} c\right )} e^{6} f g^{5} - {\left (c^{3} d^{5} e - 3 \, b c^{2} d^{4} e^{2} + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{3} e^{3} - {\left (b^{3} + 6 \, a b c\right )} d^{2} e^{4} + 3 \, {\left (a b^{2} + a^{2} c\right )} d e^{5}\right )} g^{6}\right )} x - 60 \, {\left (c^{3} e^{6} f^{6} - 3 \, b c^{2} e^{6} f^{5} g - 3 \, a^{2} b e^{6} f g^{5} + a^{3} e^{6} g^{6} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{6} f^{4} g^{2} - {\left (b^{3} + 6 \, a b c\right )} e^{6} f^{3} g^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} e^{6} f^{2} g^{4}\right )} \log \left (g x + f\right )}{60 \, {\left (e^{7} f g^{6} - d e^{6} g^{7}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 907, normalized size = 1.71 \[ \frac {{\left (c^{3} f^{6} - 3 \, b c^{2} f^{5} g + 3 \, b^{2} c f^{4} g^{2} + 3 \, a c^{2} f^{4} g^{2} - b^{3} f^{3} g^{3} - 6 \, a b c f^{3} g^{3} + 3 \, a b^{2} f^{2} g^{4} + 3 \, a^{2} c f^{2} g^{4} - 3 \, a^{2} b f g^{5} + a^{3} g^{6}\right )} \log \left ({\left | g x + f \right |}\right )}{d g^{7} - f g^{6} e} - \frac {{\left (c^{3} d^{6} - 3 \, b c^{2} d^{5} e + 3 \, b^{2} c d^{4} e^{2} + 3 \, a c^{2} d^{4} e^{2} - b^{3} d^{3} e^{3} - 6 \, a b c d^{3} e^{3} + 3 \, a b^{2} d^{2} e^{4} + 3 \, a^{2} c d^{2} e^{4} - 3 \, a^{2} b d e^{5} + a^{3} e^{6}\right )} \log \left ({\left | x e + d \right |}\right )}{d g e^{6} - f e^{7}} + \frac {{\left (12 \, c^{3} g^{4} x^{5} e^{4} - 15 \, c^{3} d g^{4} x^{4} e^{3} + 20 \, c^{3} d^{2} g^{4} x^{3} e^{2} - 30 \, c^{3} d^{3} g^{4} x^{2} e + 60 \, c^{3} d^{4} g^{4} x - 15 \, c^{3} f g^{3} x^{4} e^{4} + 45 \, b c^{2} g^{4} x^{4} e^{4} + 20 \, c^{3} d f g^{3} x^{3} e^{3} - 60 \, b c^{2} d g^{4} x^{3} e^{3} - 30 \, c^{3} d^{2} f g^{3} x^{2} e^{2} + 90 \, b c^{2} d^{2} g^{4} x^{2} e^{2} + 60 \, c^{3} d^{3} f g^{3} x e - 180 \, b c^{2} d^{3} g^{4} x e + 20 \, c^{3} f^{2} g^{2} x^{3} e^{4} - 60 \, b c^{2} f g^{3} x^{3} e^{4} + 60 \, b^{2} c g^{4} x^{3} e^{4} + 60 \, a c^{2} g^{4} x^{3} e^{4} - 30 \, c^{3} d f^{2} g^{2} x^{2} e^{3} + 90 \, b c^{2} d f g^{3} x^{2} e^{3} - 90 \, b^{2} c d g^{4} x^{2} e^{3} - 90 \, a c^{2} d g^{4} x^{2} e^{3} + 60 \, c^{3} d^{2} f^{2} g^{2} x e^{2} - 180 \, b c^{2} d^{2} f g^{3} x e^{2} + 180 \, b^{2} c d^{2} g^{4} x e^{2} + 180 \, a c^{2} d^{2} g^{4} x e^{2} - 30 \, c^{3} f^{3} g x^{2} e^{4} + 90 \, b c^{2} f^{2} g^{2} x^{2} e^{4} - 90 \, b^{2} c f g^{3} x^{2} e^{4} - 90 \, a c^{2} f g^{3} x^{2} e^{4} + 30 \, b^{3} g^{4} x^{2} e^{4} + 180 \, a b c g^{4} x^{2} e^{4} + 60 \, c^{3} d f^{3} g x e^{3} - 180 \, b c^{2} d f^{2} g^{2} x e^{3} + 180 \, b^{2} c d f g^{3} x e^{3} + 180 \, a c^{2} d f g^{3} x e^{3} - 60 \, b^{3} d g^{4} x e^{3} - 360 \, a b c d g^{4} x e^{3} + 60 \, c^{3} f^{4} x e^{4} - 180 \, b c^{2} f^{3} g x e^{4} + 180 \, b^{2} c f^{2} g^{2} x e^{4} + 180 \, a c^{2} f^{2} g^{2} x e^{4} - 60 \, b^{3} f g^{3} x e^{4} - 360 \, a b c f g^{3} x e^{4} + 180 \, a b^{2} g^{4} x e^{4} + 180 \, a^{2} c g^{4} x e^{4}\right )} e^{\left (-5\right )}}{60 \, g^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 1232, normalized size = 2.32 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.49, size = 721, normalized size = 1.36 \[ \frac {{\left (c^{3} d^{6} - 3 \, b c^{2} d^{5} e - 3 \, a^{2} b d e^{5} + a^{3} e^{6} + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{4} e^{2} - {\left (b^{3} + 6 \, a b c\right )} d^{3} e^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} d^{2} e^{4}\right )} \log \left (e x + d\right )}{e^{7} f - d e^{6} g} - \frac {{\left (c^{3} f^{6} - 3 \, b c^{2} f^{5} g - 3 \, a^{2} b f g^{5} + a^{3} g^{6} + 3 \, {\left (b^{2} c + a c^{2}\right )} f^{4} g^{2} - {\left (b^{3} + 6 \, a b c\right )} f^{3} g^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} f^{2} g^{4}\right )} \log \left (g x + f\right )}{e f g^{6} - d g^{7}} + \frac {12 \, c^{3} e^{4} g^{4} x^{5} - 15 \, {\left (c^{3} e^{4} f g^{3} + {\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} g^{4}\right )} x^{4} + 20 \, {\left (c^{3} e^{4} f^{2} g^{2} + {\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} f g^{3} + {\left (c^{3} d^{2} e^{2} - 3 \, b c^{2} d e^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{4}\right )} g^{4}\right )} x^{3} - 30 \, {\left (c^{3} e^{4} f^{3} g + {\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} f^{2} g^{2} + {\left (c^{3} d^{2} e^{2} - 3 \, b c^{2} d e^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{4}\right )} f g^{3} + {\left (c^{3} d^{3} e - 3 \, b c^{2} d^{2} e^{2} + 3 \, {\left (b^{2} c + a c^{2}\right )} d e^{3} - {\left (b^{3} + 6 \, a b c\right )} e^{4}\right )} g^{4}\right )} x^{2} + 60 \, {\left (c^{3} e^{4} f^{4} + {\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} f^{3} g + {\left (c^{3} d^{2} e^{2} - 3 \, b c^{2} d e^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{4}\right )} f^{2} g^{2} + {\left (c^{3} d^{3} e - 3 \, b c^{2} d^{2} e^{2} + 3 \, {\left (b^{2} c + a c^{2}\right )} d e^{3} - {\left (b^{3} + 6 \, a b c\right )} e^{4}\right )} f g^{3} + {\left (c^{3} d^{4} - 3 \, b c^{2} d^{3} e + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{2} e^{2} - {\left (b^{3} + 6 \, a b c\right )} d e^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} e^{4}\right )} g^{4}\right )} x}{60 \, e^{5} g^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.20, size = 794, normalized size = 1.50 \[ x^4\,\left (\frac {3\,b\,c^2}{4\,e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{4\,e^2\,g^2}\right )-x^3\,\left (\frac {\left (d\,g+e\,f\right )\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{3\,e\,g}-\frac {c\,\left (b^2+a\,c\right )}{e\,g}+\frac {c^3\,d\,f}{3\,e^2\,g^2}\right )+x^2\,\left (\frac {b^3+6\,a\,c\,b}{2\,e\,g}+\frac {\left (d\,g+e\,f\right )\,\left (\frac {\left (d\,g+e\,f\right )\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{e\,g}-\frac {3\,c\,\left (b^2+a\,c\right )}{e\,g}+\frac {c^3\,d\,f}{e^2\,g^2}\right )}{2\,e\,g}-\frac {d\,f\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{2\,e\,g}\right )+x\,\left (\frac {3\,a\,\left (b^2+a\,c\right )}{e\,g}-\frac {\left (d\,g+e\,f\right )\,\left (\frac {b^3+6\,a\,c\,b}{e\,g}+\frac {\left (d\,g+e\,f\right )\,\left (\frac {\left (d\,g+e\,f\right )\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{e\,g}-\frac {3\,c\,\left (b^2+a\,c\right )}{e\,g}+\frac {c^3\,d\,f}{e^2\,g^2}\right )}{e\,g}-\frac {d\,f\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{e\,g}\right )}{e\,g}+\frac {d\,f\,\left (\frac {\left (d\,g+e\,f\right )\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{e\,g}-\frac {3\,c\,\left (b^2+a\,c\right )}{e\,g}+\frac {c^3\,d\,f}{e^2\,g^2}\right )}{e\,g}\right )+\frac {\ln \left (d+e\,x\right )\,\left (e^4\,\left (3\,c\,a^2\,d^2+3\,a\,b^2\,d^2\right )+e^2\,\left (3\,b^2\,c\,d^4+3\,a\,c^2\,d^4\right )-e^3\,\left (b^3\,d^3+6\,a\,c\,b\,d^3\right )+a^3\,e^6+c^3\,d^6-3\,a^2\,b\,d\,e^5-3\,b\,c^2\,d^5\,e\right )}{e^7\,f-d\,e^6\,g}+\frac {\ln \left (f+g\,x\right )\,\left (g^4\,\left (3\,c\,a^2\,f^2+3\,a\,b^2\,f^2\right )+g^2\,\left (3\,b^2\,c\,f^4+3\,a\,c^2\,f^4\right )-g^3\,\left (b^3\,f^3+6\,a\,c\,b\,f^3\right )+a^3\,g^6+c^3\,f^6-3\,a^2\,b\,f\,g^5-3\,b\,c^2\,f^5\,g\right )}{d\,g^7-e\,f\,g^6}+\frac {c^3\,x^5}{5\,e\,g} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________